import { createRouter, createWebHistory } from 'vue-router'

const Login = () => import('@/pages/Login')
const Forget = () => import('@/pages/register/Forget')
const Register = () => import('@/pages/register/Register')

const Home = () => import('@/pages/Home')
const App = () => import('@/pages/App')
const UserCenter = () => import('@/pages/UserCenter')
const Main = () => import('@/pages/Main')
const Invite = () => import('@/pages/Invite')
const Setting = () => import('@/pages/Setting')

// banner
const H5Banner1 = () => import('@/pages/h5/banner1');
const H5Banner2 = () => import('@/pages/h5/banner2');
const H5Banner3 = () => import('@/pages/h5/banner3');
const H5Banner5 = () => import('@/pages/h5/system');


// 策略选择
// const StrategyIndex = () => import('@/pages/strategy/index');
const Strategy1 = () => import('@/pages/strategy/change');
const Strategy2 = () => import('@/pages/strategy/high-low-2.0');
const Strategy3 = () => import('@/pages/strategy/ag-trend');
const Strategy4 = () => import('@/pages/strategy/band-tracking');
const Strategy5 = () => import('@/pages/strategy/longterm');
const StrategyLong = () => import('@/pages/strategy/long');
const StrategyCounterfeit = () => import('@/pages/strategy/counterfeit');


// 会员中心
const VipCenter = () => import('@/pages/setting/VipCenter')
const VipCenterDemo = () => import('@/pages/setting/VipCenterDemo')
const AccountSafe = () => import('@/pages/setting/AccountSafe')
const SettingPushstate = () => import('@/pages/setting/PushState')

const ChangeLoginPassword = () => import('@/pages/setting/ChangeLoginPassword')
const ResetAppsecret = () => import('@/pages/setting/ResetAppsecret')
const Kefu = () => import('@/pages/setting/Kefu')
const Join = () => import('@/pages/setting/Join')
const History = () => import('@/pages/setting/History')
const Customized = () => import('@/pages/setting/Customized')


const Pay = () => import('@/pages/setting/pay')

const HeadImage = () => import('@/pages/user/HeadImage')


const Content = () => import('@/pages/register/Content')


// 不需要登录
// 邀请静态页面
const InviteSilent = () => import('@/pages/nologin/InviteSilent');
const AiSilent = () => import('@/pages/nologin/AiSilent');
const InviteWeex = () => import('@/pages/nologin/InviteWeex');
const InviteGroup = () => import('@/pages/nologin/InviteGroup');
const HistorySilent = () => import('@/pages/nologin/HistorySilent');

const GroupShare = () => import('@/pages/nologin/GroupShare');





export const constantRouterMap = [
    { path: '/login', component: Login },
    { path: '/forget', component: Forget },
    { path: '/register', component: Register },
   
    {
        path: '/', component: App,
        redirect: '/main',
        children: [
            { path: '/home', component: Home, redirect: '/main' },

            { path: '/main', component: Main }, // 首页
            { path: '/invite', component: Invite }, // 邀请
            { path: '/homemain', component: Home },
            { path: '/setting', component: Setting },
            { path: '/me', component: UserCenter }, // 我的
        ]
    },
    { name: 'H5Banner1', path: '/h5/banner1', component: H5Banner1 },
    { name: 'H5Banner2', path: '/h5/banner2', component: H5Banner2 },
    { name: 'H5Banner3', path: '/h5/banner3', component: H5Banner3 },
    { name: 'H5Banner5', path: '/h5/system', component: H5Banner5 },
    // { name: 'Strategy', path: '/strategy/index', component: StrategyIndex },
    // { name: 'StrategyIndex', path: '/strategy/index', component: StrategyIndex },

    // 2.0-高低点策略
    { name: 'StrategyChange', path: '/strategy/change', component: Strategy1 },
    { name: 'StrategyHighLow', path: '/strategy/high-low-2.0', component: Strategy2 },
    { name: 'StrategyAgtrend', path: '/strategy/ag-trend', component: Strategy3 },
    { name: 'StrategyBandtracking', path: '/strategy/band-tracking', component: Strategy4 },
    { name: 'StrategyLongterm', path: '/strategy/longterm', component: Strategy5 },
    { name: 'StrategyLong', path: '/strategy/long', component: StrategyLong },
    { name: 'StrategyCounterfeit', path: '/strategy/counterfeit', component: StrategyCounterfeit },
    
    { name: 'AccountSafe', path: '/setting/account-safe', component: AccountSafe },
    // 个人中心-策略选择
    { name: 'SettingPushState', path: '/setting/pushstate', component: SettingPushstate },
    { name: 'ChangeLoginPassword', path: '/setting/change-login-password', component: ChangeLoginPassword },
    { name: 'ResetAppsecret', path: '/setting/reset-appsecret', component: ResetAppsecret },
    { name: 'VipCenter', path: '/setting/vipcenter', component: VipCenter },
    { name: 'Customized', path: '/setting/customized', component: Customized },
    

    
    { name: 'SettingKefu', path: '/setting/kefu', component: Kefu },
    { name: 'SettingJoin', path: '/setting/join', component: Join },
    { name: 'SettingHistory', path: '/setting/history', component: History },
    { name: 'SettingPay', path: '/setting/pay', component: Pay },
    

    

   
    { name: 'HeadImage', path: '/user/head-img', component: HeadImage },

    { name: 'Content', path: '/content', component: Content },


    // 不需要登录
    { name: 'VipCenterDemo', path: '/setting/vipcentersilent', component: VipCenterDemo },
    { name: 'InviteSilent', path: '/invitesilent', component: InviteSilent },
    { name: 'AiSilent', path: '/aisilent', component: AiSilent },
    { name: 'InviteWeex', path: '/inviteweex', component: InviteWeex },
    { name: 'InviteGroup', path: '/invitegroup', component: InviteGroup },
    { name: 'HistorySilent', path: '/historysilent', component: HistorySilent },
    { name: 'Group', path: '/group', component: GroupShare },


    
]


export default createRouter({
    history: createWebHistory(),
    scrollBehavior: () => ({ y: 0 }),
    routes: constantRouterMap,
    
    
})

